import request from '@/config/axios'

interface MetaRecycle {
  id: number;
  days: number;
  metaId?: number | null;  // 可选字段，可以为数字或者为空
  metaName?: string | null;  // 可选字段，可以为字符串或者为空
}

/**
 * 查询元数据回收站定期清理天数
 * @param metaId
 */
export const recycleDays = async (metaId) => {
  return await request.get({ url: '/recycle/days/'+ metaId })
}

/**
 * 查询资源回收站定期清理天数
 * @param type
 */
export const recycleDaysType = async (type) => {
  return await request.get({ url: '/recycle/days/resource/type?type='+ type })
}
/**
 * 保存
 * @param params
 */
export const save = async (params: MetaRecycle) => {
  return await request.post({ url: '/recycle/save', data: params })
}
